<?php
namespace Twoir\System\Model;

use Twoir\System\Support\BothTrait;
use Twoir\System\Support\ParseTrait;

/**
 * 双表(主副表)型 栏目表
 * 
 * 【注意事项】有增减字段，请更新 字段：FIELD自定义区和默认值：MYDEFAULT自定义区，没有更新请勿动！！！
 * cighsen02 365182575
 * time: 2022.05.05 update: 2023.01.02
*/
class EnewsClass
{
	use BothTrait, ParseTrait;
	
	const TABLE = [
		'pri'	=> 'enewsclass',	//主表
		'sec'	=> 'enewsclassadd'	//副表
	];
	
	//主键字段
	const PRIMARY = 'classid';

	const FIELD = [
		'pri'	=> [
			'classid','bclassid','classname','sonclass','is_zt','lencord','link_num','newstempid','onclick','listtempid','featherclass','islast','classpath','classtype','newspath','filename',
			'filetype','openpl','openadd','newline','hotline','goodline','classurl','groupid','myorder','filename_qz','hotplline','modid','checked','firstline','bname','islist','searchtempid','tid',
			'tbname','maxnum','checkpl','down_num','online_num','listorder','reorder','intro','classimg','jstempid','addinfofen','listdt','showclass','showdt','checkqadd','qaddlist','qaddgroupid',
			'qaddshowkey','adminqinfo','doctime','classpagekey','dtlisttempid','classtempid','nreclass','nreinfo','nrejs','nottobq','ipath','addreinfo','haddlist','sametitle','definfovoteid','wburl',
			'qeditchecked','wapstyleid','repreinfo','pltempid','cgroupid','yhid','wfid','cgtoinfo','bdinfoid','repagenum','keycid','allinfos','infos','addtime','oneinfo','addsql','wapislist','fclast'
			
			//自定义
		],
		'sec'	=> [
			'classid', 'classtext', 'ttids', 'eclasspagetext'
			
			//自定义
		]
	];
	
	/**
	 * 默认值， null为自动增加字段
	 */
	const MYDEFAULT = [
		'pri'	=> [
			'classid'		=> null,
			'bclassid'		=> 0,
			'classname'		=> '',
			'sonclass'		=> '',
			'is_zt'			=> 0,
			'lencord'		=> 0,
			'link_num'		=> 0,
			'newstempid'	=> 0,
			'onclick'		=> 0,
			'listtempid'	=> 0,
			'featherclass'	=> '',
			'islast'		=> 0,
			'classpath'		=> '',
			'classtype'		=> '',
			'newspath'		=> '',
			'filename'		=> 0,
			'filetype'		=> '',
			'openpl'		=> 0,
			'openadd'		=> 0,
			'newline'		=> 0,
			'hotline'		=> 0,
			'goodline'		=> 0,
			'classurl'		=> '',
			'groupid'		=> 0,
			'myorder'		=> 0,
			'filename_qz'	=> '',
			'hotplline'		=> 0,
			'modid'			=> 0,
			'checked'		=> 0,
			'firstline'		=> 0,
			'bname'			=> '',
			'islist'		=> 0,
			'searchtempid'	=> 0,
			'tid'			=> 0,
			'tbname'		=> '',
			'maxnum'		=> 0,
			'checkpl'		=> 0,
			'down_num'		=> 0,
			'online_num'	=> 0,
			'listorder'		=> '',
			'reorder'		=> '',
			'intro'			=> '',
			'classimg'		=> '',
			'jstempid'		=> 0,
			'addinfofen'	=> 0,
			'listdt'		=> 0,
			'showclass'		=> 0,
			'showdt'		=> 0,
			'checkqadd'		=> 0,
			'qaddlist'		=> 0,
			'qaddgroupid'	=> '',
			'qaddshowkey'	=> 0,
			'adminqinfo'	=> 0,
			'doctime'		=> 0,
			'classpagekey'	=> '',
			'dtlisttempid'	=> 0,
			'classtempid'	=> 0,
			'nreclass'		=> 0,
			'nreinfo'		=> 0,
			'nrejs'			=> 0,
			'nottobq'		=> 0,
			'ipath'			=> '',
			'addreinfo'		=> 0,
			'haddlist'		=> 0,
			'sametitle'		=> 0,
			'definfovoteid'	=> 0,
			'wburl'			=> '',
			'qeditchecked'	=> 0,
			'wapstyleid'	=> 0,
			'repreinfo'		=> 0,
			'pltempid'		=> 0,
			'cgroupid'		=> 0,
			'yhid'			=> 0,
			'wfid'			=> 0,
			'cgtoinfo'		=> 0,
			'bdinfoid'		=> '',
			'repagenum'		=> 0,
			'keycid'		=> 0,
			'allinfos'		=> 0,
			'infos'			=> 0,
			'addtime'		=> 0,
			'oneinfo'		=> 0,
			'addsql'		=> '',
			'wapislist'		=> 0,
			'fclast'		=> 0
			
			//自定义
		],
		'sec'	=> [
			'classid'		=> null, 
			'classtext'		=> '', 
			'ttids'			=> '', 
			'eclasspagetext'=> ''
			
			//自定义
		]
	];
}